package com.javainterface.service;

import com.javainterface.entity.UserInfo;
import com.javainterface.mapper.JavaInterfaceMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 用于单点系统对接数据的service层(弃用)
 * userInfoTransmission：用户数据接入
 * orgInfoTransmission：组织数据接入
 */
@Service
public class DataTransmissionService {
    @Autowired
    JavaInterfaceMapper javaInterfaceMapper;

    public void userInfoTransmission(
            String org, int userFlag, String userAccount, String userPwd, String userName,
            int sex, String phoneNumber, String telPhone, String email, String job, String identityNumber,
            int userIndex, String userStatus, String businessLabel, int firstLoginFlag, int bannedFlag,
            int deleteFlag, String createTime, String updateTime
    ) {
        javaInterfaceMapper.userInfoInsert(
                org, userFlag, userAccount, userPwd, userName, sex, phoneNumber, telPhone, email, job,
                identityNumber, userIndex, userStatus, businessLabel, firstLoginFlag, bannedFlag,
                deleteFlag, createTime, updateTime
        );
    }

    public void orgInfoTransmission(
            String orgName, String orgNameLite, String orgNameParent, String orgNameEnglish, String orgNameEnglishLite, int orgType, int orgLevel,
            String socialCode, int orgIndex, String orgStatus, String orgId, String orgPath, int bannedFlag, int deleteFlag,
            String createTime, String updateTime
    ) {
        javaInterfaceMapper.orgInfoInsert(
                orgName, orgNameLite, orgNameParent, orgNameEnglish, orgNameEnglishLite, orgType, orgLevel, socialCode, orgIndex, orgStatus, orgId,
                orgPath, bannedFlag, deleteFlag, createTime, updateTime
        );
    }

}
